package cn.getech.data.development.service;

import cn.getech.data.development.entity.UserRangerPolicyRel;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 用户和ranger中的策略的关系表 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2020-01-02
 */
public interface UserRangerPolicyRelService extends IService<UserRangerPolicyRel> {

    List<UserRangerPolicyRel> selectAllListByProcIdAndList(Integer userId, List<Integer> tableIds);

    List<UserRangerPolicyRel> selectAllListByUserIdsAndTableId(Integer tableId, List<Long> allUserIds);

    void deleteByTableId(Integer tableId);

    List<UserRangerPolicyRel> selectAllListByUserId(Long userId);

    void deleteByUserId(Long userId);

    UserRangerPolicyRel limitOneByTableIdAndRowLevel(Integer tableId);

    void deleteById(Integer id);

    List<UserRangerPolicyRel> selectMaskingRulesData(Integer tableFieldId);

    List<UserRangerPolicyRel> selectMaskingRulesDataByTableId(Integer tableId);
}
